//
//  CardReaderTableViewCell.m
//  sdkdemo-iOS
//
//  Created by 范保莹 on 2018/6/8.
//  Copyright © 2018年 sdkdemo-iOS. All rights reserved.
//

#import "CardReaderTableViewCell.h"

@implementation CardReaderTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        
        self.myView = [[UIView alloc]init];
        
        self.testPortLab = [[UILabel alloc]init];
        self.testPortLab.textAlignment = NSTextAlignmentCenter;
        self.testPortLab.textColor = ALLTextColor;
        self.testPortLab.numberOfLines = 0;
        self.testPortLab.font = [UIFont systemFontOfSize:14.0];
        
        self.portFunctionLab = [[UILabel alloc]init];
        self.portFunctionLab.textAlignment = NSTextAlignmentCenter;
        self.portFunctionLab.textColor = ALLTextColor;
        self.portFunctionLab.numberOfLines = 0;
        self.portFunctionLab.font = [UIFont systemFontOfSize:14.0];
        
        self.parameterLab = [[UILabel alloc]init];
        self.parameterLab.textAlignment = NSTextAlignmentCenter;
        self.parameterLab.textColor = ALLTextColor;
        self.parameterLab.numberOfLines = 0;
        self.parameterLab.font = [UIFont systemFontOfSize:14.0];
        
        self.expectResultLab = [[UILabel alloc]init];
        self.expectResultLab.textAlignment = NSTextAlignmentCenter;
        self.expectResultLab.textColor = ALLTextColor;
        self.expectResultLab.numberOfLines = 0;
        self.expectResultLab.font = [UIFont systemFontOfSize:14.0];
        
        self.realityResultLab = [[UILabel alloc]init];
        self.realityResultLab.textAlignment = NSTextAlignmentCenter;
        self.realityResultLab.textColor = ALLTextColor;
        self.realityResultLab.numberOfLines = 0;
        self.realityResultLab.font = [UIFont systemFontOfSize:14.0];
        
        self.isPassLab = [[UILabel alloc]init];
        self.isPassLab.textAlignment = NSTextAlignmentCenter;
        self.isPassLab.textColor = ALLTextColor;
        self.isPassLab.numberOfLines = 0;
        self.isPassLab.font = [UIFont systemFontOfSize:14.0];
        
        [self.myView addSubview:_testPortLab];
        [self.myView addSubview:_portFunctionLab];
        
        [self.myView addSubview:_parameterLab];
        [self.myView addSubview:_expectResultLab];
        
        [self.myView addSubview:_realityResultLab];
        [self.myView addSubview:_isPassLab];
        
        [self.contentView addSubview:_myView];
        
        
    }
    
    
    return self;
}

- (void)layoutSubviews{
    
    [super layoutSubviews];
    
    self.myView.frame = CGRectMake(0, 0, SCREEN_WIDTH*5/6-3, 60);
    
    self.testPortLab.frame = CGRectMake(0, 5, (SCREEN_WIDTH*5/6-3)/6, 50);
    self.portFunctionLab.frame = CGRectMake((SCREEN_WIDTH*5/6-3)/6, 5, (SCREEN_WIDTH*5/6-3)/6, 50);
    self.parameterLab.frame = CGRectMake((SCREEN_WIDTH*5/6-3)/3, 5, (SCREEN_WIDTH*5/6-3)/6, 50);
    self.expectResultLab.frame = CGRectMake((SCREEN_WIDTH*5/6-3)/2, 5, (SCREEN_WIDTH*5/6-3)/6, 50);
    self.realityResultLab.frame = CGRectMake((SCREEN_WIDTH*5/6-3)*2/3, 5, (SCREEN_WIDTH*5/6-3)/6, 50);
    self.isPassLab.frame = CGRectMake((SCREEN_WIDTH*5/6-3)*5/6, 5, (SCREEN_WIDTH*5/6-3)/6, 50);
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
